package cn.tedu.store.util;

import java.io.Serializable;
/**
 *  封装响应的JSON结果的类
 * @author DELL
 *
 * @param <T>
 */
public class JsonResult<T> implements  Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6604655686665571293L;
	
	
	private Integer state;
	private String message;
	private T data;
	
	
	
	
	public JsonResult() {
		super();
	}


	public JsonResult(Integer state, T data) {
		super();
		this.state = state;
		this.data = data;
	}


	public JsonResult(Integer state) {
		super();
		this.state = state;
	}


	public JsonResult(Throwable e) {
		super();
		this.message = e.getMessage();
	}



	public Integer getState() {
		return state;
	}
	
	public void setState(Integer state) {
		this.state = state;
	}
	
	public String getMessage() {
		return message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	public T getData() {
		return data;
	}
	
	public void setData(T data) {
		this.data = data;
	}
	
	
	
	
	
	
}
